package com.itheima.servlet;
/*
Servlet处理类
    1.怎么让当前定义类拥有servlet功能   extends HttpServlet
    2.谁对这个类进行初始化    通过构造方法实例化  创建对象
     默认情况:当请求处理类是才进行实例化对象,而且只实例化一次(单例)
    3.url怎么定义


 */

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class UserServlet extends HttpServlet {
    //自调用方法

    public UserServlet(){
        System.out.println("............");
    }
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("extends");
    }
}
